3.9.61 \(\int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx\) [861]

3.9.61.1 Optimal result
3.9.61.2 Mathematica [A] (verified)
3.9.61.3 Rubi [A] (verified)
3.9.61.4 Maple [A] (verified)
3.9.61.5 Fricas [A] (verification not implemented)
3.9.61.6 Sympy [F(-1)]
3.9.61.7 Maxima [A] (verification not implemented)
3.9.61.8 Giac [A] (verification not implemented)
3.9.61.9 Mupad [B] (verification not implemented)

3.9.61.1 Optimal result

Integrand size = 21, antiderivative size = 119 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {31 a^2 \log (1-\sin (c+d x))}{8 d}-\frac {a^2 \log (1+\sin (c+d x))}{8 d}-\frac {2 a^2 \sin (c+d x)}{d}-\frac {a^2 \sin ^2(c+d x)}{2 d}+\frac {a^4}{4 d (a-a \sin (c+d x))^2}-\frac {9 a^3}{4 d (a-a \sin (c+d x))} \]

output
-31/8*a^2*ln(1-sin(d*x+c))/d-1/8*a^2*ln(1+sin(d*x+c))/d-2*a^2*sin(d*x+c)/d 
-1/2*a^2*sin(d*x+c)^2/d+1/4*a^4/d/(a-a*sin(d*x+c))^2-9/4*a^3/d/(a-a*sin(d* 
x+c))
 
3.9.61.2 Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.63 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {a^2 \left (31 \log (1-\sin (c+d x))+\log (1+\sin (c+d x))-\frac {2}{(-1+\sin (c+d x))^2}-\frac {18}{-1+\sin (c+d x)}+16 \sin (c+d x)+4 \sin ^2(c+d x)\right )}{8 d} \]

input
Integrate[(a + a*Sin[c + d*x])^2*Tan[c + d*x]^5,x]
 
output
-1/8*(a^2*(31*Log[1 - Sin[c + d*x]] + Log[1 + Sin[c + d*x]] - 2/(-1 + Sin[ 
c + d*x])^2 - 18/(-1 + Sin[c + d*x]) + 16*Sin[c + d*x] + 4*Sin[c + d*x]^2) 
)/d
 
3.9.61.3 Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3186, 99, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan ^5(c+d x) (a \sin (c+d x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (c+d x)^5 (a \sin (c+d x)+a)^2dx\)

\(\Big \downarrow \) 3186

\(\displaystyle \frac {\int \frac {a^5 \sin ^5(c+d x)}{(a-a \sin (c+d x))^3 (\sin (c+d x) a+a)}d(a \sin (c+d x))}{d}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {\int \left (\frac {a^4}{2 (a-a \sin (c+d x))^3}-\frac {9 a^3}{4 (a-a \sin (c+d x))^2}+\frac {31 a^2}{8 (a-a \sin (c+d x))}-\frac {a^2}{8 (\sin (c+d x) a+a)}-\sin (c+d x) a-2 a\right )d(a \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {a^4}{4 (a-a \sin (c+d x))^2}-\frac {9 a^3}{4 (a-a \sin (c+d x))}-\frac {1}{2} a^2 \sin ^2(c+d x)-2 a^2 \sin (c+d x)-\frac {31}{8} a^2 \log (a-a \sin (c+d x))-\frac {1}{8} a^2 \log (a \sin (c+d x)+a)}{d}\)

input
Int[(a + a*Sin[c + d*x])^2*Tan[c + d*x]^5,x]
 
output
((-31*a^2*Log[a - a*Sin[c + d*x]])/8 - (a^2*Log[a + a*Sin[c + d*x]])/8 - 2 
*a^2*Sin[c + d*x] - (a^2*Sin[c + d*x]^2)/2 + a^4/(4*(a - a*Sin[c + d*x])^2 
) - (9*a^3)/(4*(a - a*Sin[c + d*x])))/d
 

3.9.61.3.1 Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3186
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p 
_.), x_Symbol] :> Simp[1/f   Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x) 
^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && E 
qQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]
 
3.9.61.4 Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.45

method result size
parallelrisch \(\frac {4 \left (\left (\cos \left (2 d x +2 c \right )-3+4 \sin \left (d x +c \right )\right ) \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-\frac {31 \cos \left (2 d x +2 c \right )}{16}-\frac {31 \sin \left (d x +c \right )}{4}+\frac {93}{16}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (-\frac {\cos \left (2 d x +2 c \right )}{16}-\frac {\sin \left (d x +c \right )}{4}+\frac {3}{16}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {5 \cos \left (2 d x +2 c \right )}{4}+\frac {\cos \left (4 d x +4 c \right )}{32}+\frac {9 \sin \left (d x +c \right )}{4}-\frac {\sin \left (3 d x +3 c \right )}{8}-\frac {41}{32}\right ) a^{2}}{d \left (\cos \left (2 d x +2 c \right )-3+4 \sin \left (d x +c \right )\right )}\) \(173\)
risch \(4 i a^{2} x +\frac {a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {i a^{2} {\mathrm e}^{i \left (d x +c \right )}}{d}-\frac {i a^{2} {\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {8 i a^{2} c}{d}+\frac {i \left (-9 a^{2} {\mathrm e}^{i \left (d x +c \right )}-16 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+9 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}\right )}{2 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{4} d}-\frac {31 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{4 d}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{4 d}\) \(195\)
derivativedivides \(\frac {a^{2} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+2 a^{2} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(206\)
default \(\frac {a^{2} \left (\frac {\sin ^{8}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {\sin ^{8}\left (d x +c \right )}{2 \cos \left (d x +c \right )^{2}}-\frac {\left (\sin ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\sin ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\cos \left (d x +c \right )\right )\right )+2 a^{2} \left (\frac {\sin ^{7}\left (d x +c \right )}{4 \cos \left (d x +c \right )^{4}}-\frac {3 \left (\sin ^{7}\left (d x +c \right )\right )}{8 \cos \left (d x +c \right )^{2}}-\frac {3 \left (\sin ^{5}\left (d x +c \right )\right )}{8}-\frac {5 \left (\sin ^{3}\left (d x +c \right )\right )}{8}-\frac {15 \sin \left (d x +c \right )}{8}+\frac {15 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a^{2} \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) \(206\)
norman \(\frac {\frac {16 a^{2} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {16 a^{2} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {15 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {25 a^{2} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {11 a^{2} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {11 a^{2} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {25 a^{2} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {15 a^{2} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {8 a^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {16 a^{2} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a^{2} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {31 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d}-\frac {a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 d}+\frac {4 a^{2} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(303\)

input
int(sec(d*x+c)^5*sin(d*x+c)^5*(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
4*((cos(2*d*x+2*c)-3+4*sin(d*x+c))*ln(sec(1/2*d*x+1/2*c)^2)+(-31/16*cos(2* 
d*x+2*c)-31/4*sin(d*x+c)+93/16)*ln(tan(1/2*d*x+1/2*c)-1)+(-1/16*cos(2*d*x+ 
2*c)-1/4*sin(d*x+c)+3/16)*ln(tan(1/2*d*x+1/2*c)+1)+5/4*cos(2*d*x+2*c)+1/32 
*cos(4*d*x+4*c)+9/4*sin(d*x+c)-1/8*sin(3*d*x+3*c)-41/32)*a^2/d/(cos(2*d*x+ 
2*c)-3+4*sin(d*x+c))
 
3.9.61.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.41 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {4 \, a^{2} \cos \left (d x + c\right )^{4} + 22 \, a^{2} \cos \left (d x + c\right )^{2} - 12 \, a^{2} - {\left (a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) - 2 \, a^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 31 \, {\left (a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \sin \left (d x + c\right ) - 2 \, a^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (4 \, a^{2} \cos \left (d x + c\right )^{2} - 5 \, a^{2}\right )} \sin \left (d x + c\right )}{8 \, {\left (d \cos \left (d x + c\right )^{2} + 2 \, d \sin \left (d x + c\right ) - 2 \, d\right )}} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
1/8*(4*a^2*cos(d*x + c)^4 + 22*a^2*cos(d*x + c)^2 - 12*a^2 - (a^2*cos(d*x 
+ c)^2 + 2*a^2*sin(d*x + c) - 2*a^2)*log(sin(d*x + c) + 1) - 31*(a^2*cos(d 
*x + c)^2 + 2*a^2*sin(d*x + c) - 2*a^2)*log(-sin(d*x + c) + 1) - 2*(4*a^2* 
cos(d*x + c)^2 - 5*a^2)*sin(d*x + c))/(d*cos(d*x + c)^2 + 2*d*sin(d*x + c) 
 - 2*d)
 
3.9.61.6 Sympy [F(-1)]

Timed out. \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**5*sin(d*x+c)**5*(a+a*sin(d*x+c))**2,x)
 
output
Timed out
 
3.9.61.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.81 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {4 \, a^{2} \sin \left (d x + c\right )^{2} + a^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + 31 \, a^{2} \log \left (\sin \left (d x + c\right ) - 1\right ) + 16 \, a^{2} \sin \left (d x + c\right ) - \frac {2 \, {\left (9 \, a^{2} \sin \left (d x + c\right ) - 8 \, a^{2}\right )}}{\sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1}}{8 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
-1/8*(4*a^2*sin(d*x + c)^2 + a^2*log(sin(d*x + c) + 1) + 31*a^2*log(sin(d* 
x + c) - 1) + 16*a^2*sin(d*x + c) - 2*(9*a^2*sin(d*x + c) - 8*a^2)/(sin(d* 
x + c)^2 - 2*sin(d*x + c) + 1))/d
 
3.9.61.8 Giac [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.86 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=-\frac {8 \, a^{2} \sin \left (d x + c\right )^{2} + 2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) + 62 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 32 \, a^{2} \sin \left (d x + c\right ) - \frac {93 \, a^{2} \sin \left (d x + c\right )^{2} - 150 \, a^{2} \sin \left (d x + c\right ) + 61 \, a^{2}}{{\left (\sin \left (d x + c\right ) - 1\right )}^{2}}}{16 \, d} \]

input
integrate(sec(d*x+c)^5*sin(d*x+c)^5*(a+a*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
-1/16*(8*a^2*sin(d*x + c)^2 + 2*a^2*log(abs(sin(d*x + c) + 1)) + 62*a^2*lo 
g(abs(sin(d*x + c) - 1)) + 32*a^2*sin(d*x + c) - (93*a^2*sin(d*x + c)^2 - 
150*a^2*sin(d*x + c) + 61*a^2)/(sin(d*x + c) - 1)^2)/d
 
3.9.61.9 Mupad [B] (verification not implemented)

Time = 10.28 (sec) , antiderivative size = 283, normalized size of antiderivative = 2.38 \[ \int (a+a \sin (c+d x))^2 \tan ^5(c+d x) \, dx=\frac {4\,a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{4\,d}-\frac {\frac {15\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}-22\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {61\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{2}-36\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {61\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}-22\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {15\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+14\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}-\frac {31\,a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{4\,d} \]

input
int((sin(c + d*x)^5*(a + a*sin(c + d*x))^2)/cos(c + d*x)^5,x)
 
output
(4*a^2*log(tan(c/2 + (d*x)/2)^2 + 1))/d - (a^2*log(tan(c/2 + (d*x)/2) + 1) 
)/(4*d) - ((61*a^2*tan(c/2 + (d*x)/2)^3)/2 - 22*a^2*tan(c/2 + (d*x)/2)^2 - 
 36*a^2*tan(c/2 + (d*x)/2)^4 + (61*a^2*tan(c/2 + (d*x)/2)^5)/2 - 22*a^2*ta 
n(c/2 + (d*x)/2)^6 + (15*a^2*tan(c/2 + (d*x)/2)^7)/2 + (15*a^2*tan(c/2 + ( 
d*x)/2))/2)/(d*(8*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2) - 12*tan(c/2 
 + (d*x)/2)^3 + 14*tan(c/2 + (d*x)/2)^4 - 12*tan(c/2 + (d*x)/2)^5 + 8*tan( 
c/2 + (d*x)/2)^6 - 4*tan(c/2 + (d*x)/2)^7 + tan(c/2 + (d*x)/2)^8 + 1)) - ( 
31*a^2*log(tan(c/2 + (d*x)/2) - 1))/(4*d)